import request from '@/utils/request';

//短临预警数据点查询
export function dlyjDataPoint(data) {
    return request({
        url: `/dmgis/pws/CallPlugin/model?methodName=shfxrad&postdata=yl|${data.time}|${data.sc}|${data.sx}`,
        method: 'get',
        data: data
    })
}

//grid
export function dlyjGrid(data) {
    return request({
        url: `/dmgis//pws/CallPlugin/model`,
        method: 'POST',
        data: data,
    })
}

//gridarea
export function dlyjGridArea(data) {
    return request({
        url: `/dmgis/pws/CallPlugin/model${data}`,
        method: 'POST',
        data: data
    })
}

//gridupdate
export function updateGrid(data) {
    return request({
        url: `/dmgis/pws/CallPlugin/model?${data}`,
        method: 'POST',
        data: data
    })
}
//sdupdateGrid
export function sdupdateGrid(data) {
    return request({
        url: `/dmgis/pws/CallPlugin/model?${data}`,
        method: 'POST',
    })
}
//预警区分析
export function yjAnalyse(data) {
    return request({
        url: `/common/getYjqCountry`,
        method: 'POST',
        data: data
    })
}
//生成产品
export function yjProduct1(data) {
    return request({
        url: `/common/createProduct1`,
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
//生成产品
export function yjProduct2(data) {
    return request({
        url: `/common/createProduct2`,
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
//生成产品
export function yjProduct(data) {
    return request({
        url: `/common/createProduct`,
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
//
//生成产品
export function getyjImg(data) {
    return request({
        url: `/dmgis/res/pws/${data}`,
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
//获取图片
export function yjImg(data) {
    return request({
        url: `/dmgis/pws/CallPlugin/model/?methodName=makepic&postdata=${data.name}|${data.time}|${data.info}|${data.width}|${data.lonlat}`,
        method: 'POST',
        data: data,
    })
}
//产品查询
export function yjfbSearch(data) {
    return request({
        url: '/common/getProduct',
        method: 'POST',
        data: data
    })
}
//预警发布
export function yjfabu(data) {
    return request({
        url: `/common/FbProduct?advcode=${data}`,
        method: 'POST',
        data: data
    })
}
